Context-adaptive macroblock type encoding/decoding methods and apparatuses

ABSTRACT

Macroblock types of macroblocks of a video picture are encoded by adaptively employing codewords of codeword tables, based at least in part on one or more macroblock type related characteristics of one or more neighboring macroblocks of interest. The codewords may be variable in length. The one or more macroblock type characteristics may include a most common macroblock type characteristic of the neighboring macroblocks of interest. The adaptive employment of the codeword tables may be further based on a picture type of the picture of which the macroblocks are members. Decoding may be performed in an inverse manner.

RELATED APPLICATION

This application is a non-provisional application of provisionalapplication No. 60/366,835, filed Mar. 22, 2002, “Adaptive MacroblockType Coding for Block Based Video Compression”, which specification ishereby fully incorporated by reference.

FIELD OF THE INVENTION

The present invention relates to the field of video encoding/decoding.More specifically, the present invention is related to the encodingmacroblock types of macroblocks of pictures of video, and decoding ofthe encodings.

BACKGROUND OF THE INVENTION

Advances in microprocessor and video related technologies have led towide spread deployment and adoption of numerous types of video devices.Examples of such video devices include but are not limited to digitalcamcorders, digital versatile disk (DVD) players, video enabled laptopand desktop computing devices as well as servers, and so forth.

Advances in networking, telecommunication, satellite and other relatedtechnologies have also led to increase in on demand and/or real timeonline delivery of video, including delivery over public networks, suchas the Internet.

Whether videos are delivered offline (e.g. from a DVD player) or online(e.g. from a video server), high quality video inherently requires ahigh volume of data. Thus, video delivery and rendering often involveencoding and decoding to reduce the amount of data to be stored,retrieved and/or transmitted.

Encoding/decoding of a video often involves processing the video as astream of pictures. Each picture may be a field or a frame (typicallyconsisting of two interleaved fields) comprising a number ofmacroblocks.

Each picture may be typed, e.g. an 1-type, a P-type, or a B-type (alsoreferred as I picture, P picture and B picture). An I picture is apicture coded using information only from itself. A P picture is apicture coded using motion compensated prediction frompreviously-decoded reference fields or frames, using at most one motionvector and reference picture to predict the value of each individualregion. A B picture is a “predictive-coded” picture, where somemacroblocks may use a weighted average of two distinctmotion-compensated prediction values for the prediction of themacroblock sample values.

Each macroblock typically comprises tiles of pixels, e.g. tiles of 16×16pixels. Further, each macroblock is typically typed, with the macroblocktype indicating the specific method to encode (and therefore decode)this group of pixels, e.g. whether coding (and therefore decoding) isbased on global motion, local motion, and so forth. Moreover, eachmacroblock type itself is typically coded into a codeword, along withcoding of other aspects of the macroblock, e.g. its transformcoefficients and so forth.

However, in the prior art, macroblock type is typically encoded in astatic, i.e. non-adaptive, variable length encoding (VLC) manner.Experience has shown static VLC encoding of macroblock types ofmacroblocks of a picture may be inefficient, at least at times.

Thus, it will be desirable to encode and decode macroblock types ofmacroblocks of pictures of a video in a context-adaptive manner that ismore effective, than the static non-adaptive techniques known to-date.

For further information on macroblock type, and prior art approaches toencoding macroblock type, see e.g. ITU-T Recommendation H.263 (ITU-Tstands for International Telecommunication Union—TelecommunicationStandardisation Sector).

BRIEF DESCRIPTION OF THE DRAWINGS

The present invention will be described by way of exemplary embodiments,but not limitations, illustrated in the accompanying drawings in whichlike references denote similar elements, and in which:

FIG. 1 illustrates an overview of a context-adaptive encoder of thepresent invention for encoding macroblock types of macroblocks of apicture, in accordance with one embodiment;

FIG. 2 illustrates the operational flow of the relevant aspects of theencoder block of FIG. 1 for encoding macroblock types of macroblocks ofa picture, in accordance with one embodiment;

FIG. 3 a illustrates processing of macroblocks of a picture, inaccordance with one embodiment;

FIG. 3 b illustrates the neighboring macroblocks which macroblock typesare considered in the selection of a codeword table for use to encodethe macroblock type of a macroblock, in accordance with one embodiment;

FIG. 4 illustrates an overview of a context-adaptive decoder of thepresent invention for decoding macroblock types encodings generated inaccordance with principles similar to those practiced by the encoder ofFIG. 1, in accordance with one embodiment;

FIG. 5 illustrates the operational flow of the relevant aspects of thedecoder block of FIG. 4 for decoding adaptively generated macroblocktype encodings of macroblocks of a picture, in accordance with oneembodiment;

FIG. 6 illustrates a video device having an encoder and a decoderincorporated with the encoding/decoding teachings of the presentinvention, in accordance with one embodiment;

FIG. 7 illustrates an article of manufacture with a recordable mediumhaving a software implementation of the encoder/decoder of the presentinvention, designed for use to program a device to equip the device withthe encoding/decoding capability of the present invention, in accordancewith one embodiment; and

FIG. 8 illustrates a system having a video sender device and a videoreceiver device incorporated with the encoding/decoding teachings of thepresent invention, in accordance with one embodiment.

DETAILED DESCRIPTION OF EMBODIMENTS OF THE INVENTION

The present invention includes a context-adaptive macroblock typeencoder, a complementary decoder, devices equipped with these encodersand/or decoders, systems made up of such devices, and methods ofoperations of these elements, devices and systems, and related subjectmatters.

In the following description, various aspects of the present inventionwill be described. However, it will be apparent to those skilled in theart that the present invention may be practiced with only some or allaspects of the present invention. For purposes of explanation, specificnumbers, materials and configurations are set forth in order to providea thorough understanding of the present invention. However, it will beapparent to one skilled in the art that the present invention may bepracticed without the specific details. In other instances, well-knownfeatures are omitted or simplified in order not to obscure the presentinvention.

Terminology

Parts of the description will be presented in video encoding anddecoding terms consistent with the manner commonly employed by thoseskilled in the art to convey the substance of their work to othersskilled in the art. These common video encoding and decoding terms arewell understood by those skilled in the art. In particular, in a videodevice, these quantities may take the form of electrical, magnetic, oroptical signals capable of being stored, transferred, combined, andotherwise manipulated through electrical and/or optical components of aprocessor, and its subsystems.

In various video encoding/decoding standards, encodings are organized inaccordance with certain syntactical rules, thus they are also referredto as “syntax elements” at times.

Section Headings, Order of Descriptions and Embodiments

Section headings are merely employed to improve readability, and theyare not to be construed to restrict or narrow the present invention.

Various operations will be described as multiple discrete steps in turn,in a manner that is helpful in understanding the present invention,however, the order of description should not be construed as to implythat these operations are necessarily order dependent. In particular,these operations need not be performed in the order of presentation.

The phrase “in one embodiment” is used repeatedly. The phrase generallydoes not refer to the same embodiment, however, it may. The terms“comprising”, “having” and “including” are synonymous, unless thecontext dictates otherwise.

Encoder

FIG. 1 illustrates an overview of a context-adaptive encoder of thepresent invention for encoding macroblock types of macroblocks of apicture, in accordance with one embodiment. As illustrated, for theembodiment, context-adaptive encoder 100 includes codeword tables 102,coding logic/writer 104, macroblock type buffer 106, coupled to eachother and to input 108 as shown, to receive macroblock types ofmacroblocks of pictures of a video. Typically, the macroblock types arereceived in the form of a stream of binary data. In response, for eachreceived macroblock type, coding logic/writer 104 using one or moremacroblock type related characteristics of one or more macroblocksneighbor to the macroblock to select one of codeword tables 102, andencodes the macroblock type, in accordance with the selected one ofcodeword tables 102. Coding logic/writer 104 further outputs thecodewords into a bit stream at output 110.

In other words, macroblock type buffer 106 is employed to store at leastthe macroblock types of the neighboring macroblocks of interest. In oneembodiment, buffer 106 has sufficient capacity to store the macroblocktypes of all macroblocks of a picture, and for each macroblock type of amacroblock to be encoded, coding logic/writer 104 reads out only themacroblock types of the neighboring macroblocks of interest.

In various embodiments, the macroblocks of a picture are processedleft-to-right, top-to-bottom, starting with the top leftmost macroblock,as depicted by arrows 304 a-304 c in FIG. 3 a, superimposed on themacroblocks of an example picture 302.

In various embodiments, as illustrated in FIG. 3 b, the neighboringmacroblocks 312 a-312 d which macroblock types are considered in theselection of a codeword table 102 to encode the macroblock type of amacroblock 312 e of a picture comprises

-   -   a) macroblock 312 d immediately preceding macroblock 312 e “at        the same horizontal level”, i.e. to the left of macroblock 312        e, if present,    -   b) macroblock 312 b immediately “above” macroblock 312 e        vertically, if present,    -   c) macroblock 312 a immediately preceding macroblock 312 b “at        the same horizontal level”, i.e. to the left of macroblock 312        b, if preset, and    -   d) macroblock 312 c immediately following macroblock 312 b “at        the same horizontal level”, i.e. to the right of macroblock 312        b, if present.

In one words, for the embodiment, neighboring macroblocks whichmacroblock types are considered of interest include “preceding”macroblocks which are immediately adjacent to the macroblock whichmacroblock type is to be encoded, in both a horizontal and a verticaldirection, as well as “preceding” macroblocks which are one degreeremoved from the macroblock, which macroblock type is to be encoded.

In alternate embodiments, more or less preceding neighboringmacroblock's macroblock types may be considered.

Macroblocks 312 a and 312 d are “not present”, when the currentmacroblock which macroblock type is to be encoded is located at the leftedge of the picture. Similarly, macroblocks 312 a-312 c are “notpresent”, when the current macroblock which macroblock type is to beencoded is located at the top edge of the picture.

In various embodiments, the selection of a codeword table 102 is basedat least in part on a macroblock type characteristic of the neighboringmacroblocks of interest. More specifically, in various embodiments, theselection of a codeword table 102 is based at least in part on the mostcommon macroblock type of the neighboring macroblocks of interest. Inalternate embodiments, one or more other characteristics in addition toor in lieu of the most common macroblock type of the neighboringmacroblocks of interest may be employed in the selection of the codewordtables 104 instead.

Further, in various embodiments, the adaptive encoding of macroblocktypes of the present invention is practiced for pictures of certainpicture type only. In various embodiments, it is practiced for Ppictures and B pictures only.

Moreover, in various ones of these embodiments, the selection of acodeword table 102 is based at least in part on the picture type of thecurrent picture which macroblocks' macroblock types are being encoded.In various embodiments, the picture type of a picture may be at leastone of n picture types, n being an integer, and different sets ofcodeword tables are employed in the encoding of macroblock types ofmacroblocks of pictures of the different types. In various embodiments,n equals two.

The exact nature of the picture types is non-essential to the practiceof the present invention. Accordingly, for ease of understanding, forthe two picture type embodiments, the two picture types will simply bereferred to as picture type I and picture type II.

In various embodiments, the macroblock type of a macroblock of a Type Ipicture may be one of m1 macroblock types. Accordingly, for theembodiments where the selection criteria comprises one attribute of theneighboring macroblocks of interest, such as the most common macroblocktype, the set of codeword tables to be adaptively employed to encodemacroblock types of macroblocks of a picture of Type I comprises m1codeword tables, each having m1 codewords. In various embodiments, thecodewords are VLC codewords, and m1 equal seven.

In various embodiments, the macroblock type of a macroblock of a Type IIpicture may be one of m2 macroblock types. Accordingly, for theembodiments where the selection criteria comprises one attribute of theneighboring macroblocks of interest, such as the most common macroblocktype, the set of codeword tables to be adaptively employed to encodemacroblock types of macroblocks of a picture of Type II comprises m2codeword tables, each having m2 codewords. In various embodiments, thecodewords are VLC codewords, and m2 equals six.

The exact meaning of each of the macroblock types of macroblocks of apicture of a particular type is also non-essential to the practice ofthe present invention. Accordingly, for ease of understanding, theyshall simply be referred to as macroblock type A1 through macroblocktype G1, in the case where there are seven macroblock types, andmacroblock type A2 through F2, in the case where there are sixmacroblock types.

In one embodiment where the codeword table selection criteria comprisesthe most common macroblock type characteristic of the neighboringmacroblocks of interest and there are seven possible macroblock typesfor the macroblocks of a picture, the codeword tables for encodingmacroblock types of the macroblocks of the picture may be

Table 1 Table 4 MC = Type Table 2 Table 3 MC = Type MB type A1 MC = TypeB1 MC = Type C1 D1 Type A1 1 001 01101 1001 Type B1 01 1 0101 10001 TypeC1 001 01 1 01 Type D1 000001 0000001 0100 00 Type E1 00001 000001 001101 Type F1 0001 00001 000 11 Type G1 0000001 0001 0111 100001 MB TypeTable 5 Table 6 Table 7 MB Type MC = Type E1 MC = Type F1 MC = Type G1Type A1 00001 00001 000001 Type B1 000001 000001 001 Type C1 1 1 01 TypeD1 0001 0001 0000001 Type E1 01 001 00001 Type F1 001 01 0001 Type G10000001 0000001 1

where MC=Most Common Macroblock Type of the neighboring macroblocks ofinterest.

In one embodiment where the codeword table selection criteria comprisesthe most common macroblock type characteristic of the neighboringmacroblocks of interest and there are six possible macroblock types forthe macroblocks of a picture, the codeword tables for encodingmacroblock types of the macroblocks of the picture may be

Table 1 Table 2 Table 3 MB Type MC = Type A2 MC = Type B2 MC = Type C2Type A2 01 0001 000001 Type B2 101 1 0001 Type C2 00 001 1 Type D2 11 0101 Type E2 10001 000001 00001 Type F2 1001 00001 001 Table 4 Table 5Table 6 MB Type MC = Type D MC = Type E MC = Type F Type A2 01001 000001000001 Type B2 001 00001 00001 Type C2 000 001 001 Type D2 1 01 1 TypeE2 0101 0001 0001 Type F2 011 1 01

where MC also equals “Most Common Macroblock Type” of the neighboringmacroblocks of interest.

In various embodiments, where the selection process may end with a tie,such as embodiments employing the “most common macroblock type” amongthe neighboring macroblocks of interest as the selection criteria, oneor more tie breaking rules may be employed to break a tie in the eventtwo or more macroblock types have the same frequency of occurrence. Invarious embodiments, a tie breaking rule may be a precedence rule. Inone embodiment, where the “most common macroblock type” among theneighboring macroblocks of interest is employed as the selectioncriteria, and the macroblock type may be one of seven macroblock types,the precedence rule may be

Precedence Macroblock Type 1 Type A 2 Type B 3 Type C 4 Type D 5 Type E6 Type F 7 Type G

where precedence value 1 is highest and 7 is lowest.

In another similar embodiment, where there are six possible macroblocktypes, the precedence rule may be

Precedence Macroblock Types 1 Type F 2 Type E 3 Type D 4 Type C 5 Type B6 Type A

where precedence value 1 is highest and 6 is lowest.

The above precedence rules are merely exemplary. They do not suggestthat the precedence values of a precedence rule have to have either anascending or a descending correlation with the manner the macroblocktypes is “labeled”. The present invention includes all possiblecombinations of macroblock type labeling and precedence ordering.

FIG. 2 illustrates the operational flow of the relevant aspects ofcoding logic/writer 104 of FIG. 1 for adaptively encoding macroblocktypes of macroblocks of a picture, in accordance with one embodiment. Asillustrated, for the embodiment, at block 202, on receipt of amacroblock type, coding logic/writer 104 may first determine a picturetype of a picture, if appropriate. Typically, the determination isperformed once per picture. The determination may e.g. involve examininga picture type indicator in one or more of the leading data bits of apicture. The macroblock type may be received in stream as illustrated inFIG. 1 or also retrieved from buffer 106 after it has been received andstored.

At block 204, coding logic/writer 104 obtains macroblock type relatedcharacteristic data of neighboring macroblocks of interest. In oneembodiment, coding logic/writer 104 retrieves from macroblock typebuffer 106 the macroblock types of up to 4 macroblocks of interest asearlier described.

At block 206, coding logic/writer 104 determines at least one macroblocktype characteristic of the neighboring macroblocks of interest. In oneembodiment, coding logic/writer 104 determines the most commonmacroblock type among the neighboring macroblocks of interest (employingone or more tie breaking rules, such as a precedence rule, ifnecessary).

At block 208, coding logic/writer 104 selects one of the codeword tables102 based at least in part on the one or more determined macroblock typecharacteristics of the neighboring macroblocks of interest. In variousembodiments, the selection is further based on the picture type of thepicture of which the macroblock (which macroblock type is to be encoded)is a member.

At block 210, coding logic/writer 104 encodes the macroblock type of themacroblock accordingly, using an appropriate one of the codewords of theselected codeword table, and outputs the encoding, i.e. the VLC codeword(in embodiments where VLC codewords are used).

Referring back to FIG. 1, except for codeword table 102, novelemployment of buffer 106 to track macroblock types of neighboringmacroblocks of interest, and the employment of these elements by codinglogic/writer 104 to adaptively select an appropriate codeword table 102to encode a macroblock type of a macroblock of a picture, other aspectsof encoder 100 are known, and therefore, not illustrated nor described.

In various embodiments, encoder 100 including codeword table 102, codinglogic/writer 104, and macroblock type buffer 106 may be implemented inhardware, e.g. via application specific integrated circuit (ASIC), or insoftware, e.g. in programming languages such as C, or a combination ofboth.

In various embodiments, coding logic/writer 104 also generates anencoding (DQUANT) indicating whether quantization parameters of themacroblocks have changed. In various embodiments, DQUANT is also lookedup from the same codeword table 102 selected to encode a macroblock typeof the macroblock.

In one implementation of the earlier described codeword table designedfor use to encode macroblock types of macroblocks of a picture havingseven possible macroblock types, the codeword tables 102 may furtherinclude the following DQUANT codewords, one each for the correspondingseven codeword tables:

Table 1 Table 4 MC = Type Table 2 Table 3 MC = Type MB type A1 MC = TypeB1 MC = Type C1 D1 DQUANT 0000000 0000000 01100 100000 Table 5 Table 6Table 7 MB Type MC = Type E1 MC = Type F1 MC = Type G1 DQUANT 00000000000000 0000000

where MC=Most Common Macroblock Type of the neighboring macroblocks ofinterest.

In another implementation of the earlier described codeword tabledesigned for use to encode macroblock types of macroblocks of a picturehaving six possible macroblock types, the codeword tables 102 mayfurther include the following DQUANT codewords, one each for thecorresponding six codeword tables:

Table 1 Table 2 Table 3 MB Type MC = Type A2 MC = Type B2 MC = Type C2DQUANT 10000 000000 000000 Table 4 Table 5 Table 6 MB Type MC = Type DMC = Type E MC = Type F DQUANT 01000 000000 000000

where MC also equals “Most Common Macroblock Type” of the neighboringmacroblocks of interest.

Decoder

FIG. 4 illustrates an overview of a context-adaptive decoder of thepresent invention for decoding macroblock type encodings generated asearlier described, in accordance with one embodiment. As illustrated,for the embodiment, context-adaptive decoder 400 is similarlyconstituted as encoder 100, having codeword tables 402, decodinglogic/reader 404 and macroblock type buffer 406 coupled to each otherand to input 410 as shown, to receive a bit stream comprising macroblocktypes encoded in codewords generated in accordance with the sameprinciples as earlier described. In response, for each receivedmacroblock type encoding, decoding logic/reader 404 using one or moremacroblock types of one or more macroblocks neighbor to the macroblockto select one of codeword tables 402, and decodes the macroblock typeencoding, in accordance with the selected one of codeword tables 402.Decoding logic/reader 404 further outputs the decoded macroblock typeinto a bit stream at output 110.

In other words, macroblock type buffer 406 is employed to store at leastthe decoded macroblock types of the neighboring macroblocks of interest.In one embodiment, buffer 406 has sufficient capacity to store thedecoded macroblock types of all macroblocks of a picture, and for eachmacroblock type of a macroblock to be decoded, decoding logic/reader 404reads out only the decoded macroblock type of the macroblocks ofinterest.

The selection of an appropriate one of codeword tables 402 for use inthe decoding of a macroblock type encoding is complementary to themanner an appropriate one of codeword tables 102 is selected for use inencoding. That is, an appropriate one of codeword tables 402 is selectedbased at least in part on one or more macroblock type related attributeof the neighboring macroblocks of interest, if the appropriate one ofcodeword tables 102 is so selected.

In particular, selection of an appropriate one of codeword tables 402 isbased at least in part on the most common macroblock type of theneighboring macroblocks of interest, if selection of an appropriate oneof codeword tables 102 is so based. One or more tie breaking rulescorresponding to the ones used during encoding may be used duringdecoding.

Selection of an appropriate one of codeword tables 402 is further basedon the picture type of the picture of which the macroblock is a member,if selection of an appropriate one of codeword tables 102 is so furtherbased.

The neighboring macroblocks of interest are those illustrated in FIG. 3b, if they are the neighboring macroblocks of interest during encoding.The codeword tables employed for pictures of different picture types arethe tables earlier described, if they are the tables employed forencoding.

FIG. 5 illustrates the operational flow of the relevant aspects ofdecoding logic/reader 404 of FIG. 4 for adaptively decoding encodedmacroblock types of macroblocks of a picture, in accordance with oneembodiment. As illustrated, for the embodiment, at block 502, on receiptof a macroblock type encoding, decoding logic/reader 404 may firstdetermine a picture type of a picture, if appropriate. Typically, thedetermination is performed once per picture. The determination may e.g.involve examining a picture type indicator in one or more of the leadingdata bits of a picture.

At block 504, decoding logic/reader 404 obtains macroblock type relatedcharacteristic data of neighboring macroblocks of interest. In oneembodiment, decoding logic/reader 404 retrieves from macroblock typebuffer 406 the macroblock types of up to 4 macroblocks of interest asearlier described.

At block 506, decoding logic/reader 404 determines at least onemacroblock type characteristic of the neighboring macroblocks ofinterest. In one embodiment, decoding logic/reader 404 determines themost common macroblock type among the neighboring macroblocks ofinterest (employing a tie breaking rule if necessary).

At block 508, decoding logic/reader 404 selects one of the codewordtables 102 based at least in part on the one or more determinedmacroblock type characteristics of the neighboring macroblocks ofinterest. In various embodiments, the selection is further based on thepicture type of the picture of which the macroblock is a member.

At block 510, decoding logic/reader 404 decodes the encoded macroblocktype of the macroblock accordingly, using an appropriate one of thecodewords of the selected codeword table, and outputs the decodedmacroblock type.

Referring back to FIG. 4, except for codeword table 402, novelemployment of buffer 406 to track macroblock types of neighboringmacroblocks of interest, and the employment of these elements bydecoding logic/writer 404 to adaptively select an appropriate codewordtable 402 to decode a macroblock type encoding for a macroblock of apicture, other aspects of decoder 400 are known, and therefore, notillustrated nor described.

In various embodiments, decoder 400 including codeword table 402,decoding logic/reader 404, and macroblock type buffer 406 may besimilarly implemented in hardware, e.g. via application specificintegrated circuit (ASIC), or in software, e.g. in programming languagessuch as C, or a combination of both.

In various embodiments, coding logic/reader 404 accommodates thepresence of an encoding (DQUANT) inter-mixed among the macroblock typeencodings, with DQUANT, as earlier described, indicating whetherquantization parameters of the macroblocks have changed.

In various embodiments, the encoding to be recognized is also looked upfrom the same codeword table 102 selected to decode a macroblock type ofthe macroblock.

In one implementation of the earlier described codeword tables designedfor use to encode macroblock types of macroblocks of a picture havingseven or six possible macroblock types, the codeword tables 102 mayfurther include the DQUANT codewords, one each for the correspondingcodeword tables, as set forth above.

Example Applications of the Present Invention

FIG. 6 illustrates a video device incorporated with the teachings of thepresent invention, in accordance with one embodiment. As illustrated,video device 600 includes encoder 610 and decoder 620 coupled to theinputs and outputs of the device. As described earlier, encoder 610 isdesigned to receive macroblock types of macroblocks of pictures of avideo, and to adaptively encode them in response, into VLC codewords 634a. Decoder 620 is designed to receive VLC codewords 634 b of themacroblock types of macroblocks of pictures of another video, and toadaptively decode in response the codewords back into macroblock types632 b.

Encoder 610 and decoder 620 are similarly constituted as the earlierdescribed encoder 100 and decoder 400. In various embodiments, encoder610 and decoder 620 may share at least in part their constituting tablesand coding/decoding logics (as denoted by the intersecting blocks ofencoder 610 and decoder 620).

In various embodiments, video device 600 may be a wireless mobile phone,a palm sized computing device, such as a personal digital assistant, alaptop computing device, a desktop computing device, a server, and othercomputing devices of the like. In other embodiments, video device 600may be a circuit board component, such as a video “add-on” circuit board(also referred to as a daughter circuit board), a motherboard, and othercircuit boards of the like.

In yet other embodiments, instead of having both encoder 610 and decoder620, video device 600 may include encoder 610 only, as in the case of avideo camera, or decoder 620 only, as in the case of a DVD player, atelevision, a display monitor, or a set-top box.

FIG. 7 illustrates an article of manufacture including a recordablemedium 700 having programming instructions implementing a softwareembodiment of the earlier described encoder 100 and/or decoder 400. Theprogramming instructions are designed for use to program video device710 to equip video device 710 with the encoding and decodingcapabilities of the present invention.

For the embodiment, video device 710 include storage medium 712 to storeat least a portion of a working copying of the programming instructionsimplementing the software embodiment of encoder 100 and/or decoder 400,and at least one processor 714 coupled to storage medium 712 to executethe programming instructions.

Video device 712 may be any one of the earlier enumerated example devicedevices or other video devices of the like. Article 710 may e.g. be adiskette, a compact disk (CD), a DVD or other computer readable mediumof the like. In other embodiments, article 710 may be a distributionserver distributing encoder 100 and/or decoder 400 on line, via privateand/or public networks, such as the Internet. In one embodiment, article710 is a web server.

FIG. 8 illustrates an example system having video sender 802 and videoreceiver 804 communicatively coupled to each other as shown, with videosender 802 encoding a video in accordance with the teachings of thepresent invention, and providing the encoded video to video receiver802, and video receiver 802, in turn decoding the encoded video torender the video. Video sender 802 and video receiver 804 are equippedwith the earlier described encoder 100 and decoder 400 respectively.

An example of video sender 802 is a video server, whereas an example ofa video receiver 804 is a client device coupled to video sender 802.

CONCLUSION AND EPILOGUE

Thus, it can be seen from the above descriptions, a novel method forencoding and decoding macroblock types of macroblocks of a picture,including encoders, decoders, devices and systems incorporated with themethod have been described.

While the present invention has been described in terms of the foregoingembodiments and example applications, those skilled in the art willrecognize that the invention is not limited to the embodiments andexample application described. The present invention can be practicedwith modification and alteration within the spirit and scope of theappended claims. For examples, different number of encoder/decoderblocks, different number of codeword tables in the variousencoder/decoder blocks, different codeword tables, and differentcodeword table selection logic.

Thus, the description is to be regarded as illustrative instead ofrestrictive on the present invention.

1. An apparatus comprising: storage medium; and a plurality of codewordtables stored in said storage medium, with each of said plurality ofcodeword tables having a plurality of codewords, one of said pluralityof codeword tables to be selectively accessed based at least in part ona most common macroblock type of a plurality of neighboring macroblocksof a macroblock of a picture, for performing a selected one of encodinga macroblock type of the macroblock of the picture using an appropriateone of the codewords of the selectively accessed codeword table; anddecoding a macroblock type of a macroblock of the picture using anappropriate one of the codewords of the selectively accessed codewordtable.
 2. The apparatus of claim 1, wherein the plurality of codewordtables are to be selectively accessed based also on a picture type ofthe picture.
 3. The apparatus of claim 1, wherein the plurality ofneighboring macroblocks comprise first one or more macroblocksimmediately adjacent to the macroblock.
 4. The apparatus of claim 3,wherein the plurality of neighboring macroblocks further comprisessecond one or more macroblocks immediately adjacent to one of the firstone or more macroblocks.
 5. The apparatus of claim 1, wherein theplurality of codeword tables comprises at least one of the followingcodeword tables Coded MB Most common neighboring macroblock type typeType A Type B Type C Types D Type A 1 001 01101 1001 Type B 01 1 010110001 Type C 001 01 1 01 Type D 000001 0000001 0100 00 Type E 00001000001 001 101 Type F 0001 00001 000 11 Type G 0000001 0001 0111 100001

Coded MB Most common macroblock type type Type E Type F Type G Type A00001 00001 000001 Type B 000001 000001 001 Type C 1 1 01 Type D 00010001 0000001 Type E 01 001 00001 Type F 001 01 0001 Type G 00000010000001
 1.


6. The apparatus of claim 1, wherein the plurality of codeword tablescomprises at least one of the following codeword tables Coded MB Mostcommon macroblock type type Type A Type B Type C Type A 01 0001 000001Type B 101 1 0001 Type C 00 001 1 Type D 11 01 01 Type E 10001 00000100001 Type F 1001 00001 001 Coded MB Most Common macroblock type typeType D Type E Type F Type A 01001 000001 000001 Type B 001 00001 00001Type C 000 001 001 Type D 1 01 1 Type E 0101 0001 0001 Type F 011 1
 01.


7. The apparatus of claim 1, wherein the most common macroblock typecomprises a first macroblock type having equal frequency of occurrenceamong the plurality of neighboring macroblocks, with at least a secondmacroblock type, but precedence over that of the second macroblock type.8. The apparatus of claim 1, wherein at least one of the codeword tablesfurther comprises a codeword to encode whether a quantization parameterof the macroblock has changed (DQUANT).
 9. The apparatus of claim 8,wherein at least one of the DQUANTs is a selected one of “0000000”,“01100”, and “100000”.
 10. The apparatus of claim 8, wherein at leastone of the DQUANTs is a selected one of “01000”, and “10000”.
 11. Theapparatus of claim 1, wherein the apparatus further comprises logiccoupled to the plurality of codeword tables to perform at least one ofencoding a macroblock type of a macroblock of a picture; and decoding amacroblock type of a macroblock of a picture.
 12. The apparatus of claim1, wherein the apparatus further comprises a processor coupled to thestorage medium to selectively access said codewords of said codewordtables to perform said encoding/decoding.
 13. The apparatus of claim 1,wherein the apparatus comprises a selected one of a palm sized computingdevice, a wireless mobile phone, a digital personal assistant, a laptopcomputing device, a desktop computing device, a set-top box, a server, acompact disk player, a digital versatile disk player, a television, anda display monitor.
 14. The apparatus of claim 1, wherein the apparatusfurther comprises a video daughter card and a motherboard havingintegrated video capability.
 15. A non-transitory computer-readablestorage medium having stored therein instructions comprising: aplurality of codeword tables to be retrieved to program an apparatus,with each of said plurality of codeword tables having a plurality ofcodewords, one of said plurality of codeword tables to be selectivelyaccessed, based at least in part on a most common macroblock type of aplurality of neighboring macroblocks of a macroblock of a picture, forperforming a selected one of encoding a macroblock type of themacroblock of the picture using an appropriate one of the codewords ofthe selectively accessed codeword table; and decoding a macroblock typeof a macroblock of the picture using an appropriate one of the codewordsof the selectively accessed codeword table.
 16. The computer-readablestorage medium of claim 15, wherein the plurality of codeword tables areto be selectively accessed based also on a picture type of the picture.17. The computer-readable storage medium of claim 15, wherein theplurality of neighboring macroblocks comprise first one or moremacroblocks immediately adjacent to the macroblock.
 18. Thecomputer-readable storage medium of claim 17, wherein the plurality ofneighboring macroblocks further comprises second one or more macroblocksimmediately adjacent to one of the first one or more macroblocks. 19.The computer-readable storage medium of claim 15, wherein the pluralityof codeword tables comprises at least one of the following codewordtables Coded MB Most common neighboring macroblock type type Type A TypeB Type C Types D Type A 1 001 01101 1001 Type B 01 1 0101 10001 Type C001 01 1 01 Type D 000001 0000001 0100 00 Type E 00001 000001 001 101Type F 0001 00001 000 11 Type G 0000001 0001 0111 100001

Coded MB Most common macroblock type type Type E Type F Type G Type A00001 00001 000001 Type B 000001 000001 001 Type C 1 1 01 Type D 00010001 0000001 Type E 01 001 00001 Type F 001 01 0001 Type G 00000010000001
 1.


20. The computer-readable storage medium of claim 15, wherein theplurality of codeword tables comprises at least one of the followingcodeword tables Coded MB Most common macroblock type type Type A Type BType C Type A 01 0001 000001 Type B 101 1 0001 Type C 00 001 1 Type D 1101 01 Type E 10001 000001 00001 Type F 1001 00001 001 Coded MB MostCommon macroblock type type Type D Type E Type F Type A 01001 000001000001 Type B 001 00001 00001 Type C 000 001 001 Type D 1 01 1 Type E0101 0001 0001 Type F 011 1
 01.


21. The computer-readable storage medium of claim 15, wherein the mostcommon macroblock type comprises a first macroblock type having equalfrequency of occurrence among the plurality of neighboring macroblocks,with a second macroblock type, but precedence over that of the secondmacroblock type.
 22. The computer-readable storage medium of claim 15,wherein at least one of the codeword tables further comprises a codewordto encode whether a quantization parameter of the macroblock has changed(DQUANT).
 23. The computer-readable storage medium of claim 15, furthercomprising programming instructions recorded on the computer-readablemedium, designed to utilize the plurality of codeword tables to performat least one of encoding a macroblock type of a macroblock of a picture;and decoding a macroblock type of a macroblock of a picture.
 24. Avideo-device implemented video encoding/decoding method comprising:determining, by the video device, a most common macroblock type of aplurality of neighboring macroblocks of a macroblock of a picture;obtaining, by the video device, a plurality of codeword tables, witheach of said plurality of codeword tables having a plurality ofcodewords for encoding macroblock types; selecting, by the video device,one of said plurality of codeword tables based at least in part on thedetermined most common macroblock type of the plurality of neighboringmacroblocks of the macroblock; performing, by the video device,computer, a selected one of encoding and decoding of a macroblock typeof the macroblock of the picture, using an appropriate one of thecodewords of the selected codeword table; and performing, by the videodevice, a selected one of storing the encoded macroblock type to a bitstream and outputting the picture to a display device.
 25. The method ofclaim 24, wherein the method further comprises determining a picturetype of the picture, and said selecting is further based on thedetermined picture type of the picture.
 26. The method of claim 24,wherein the plurality of neighboring macroblocks comprise first one ormore macroblocks immediately adjacent to the macroblock.
 27. The methodof claim 26, wherein the plurality of neighboring macroblocks furthercomprises second one or more macroblocks immediately adjacent to one ofthe first one or more macroblocks.
 28. The method of claim 24, whereinthe plurality of codeword tables comprises at least one of the followingcodeword tables Coded MB Most common neighboring macroblock type typeType A Type B Type C Types D Type A 1 001 01101 1001 Type B 01 1 010110001 Type C 001 01 1 01 Type D 000001 0000001 0100 00 Type E 00001000001 001 101 Type F 0001 00001 000 11 Type G 0000001 0001 0111 100001

Coded MB Most common macroblock type type Type E Type F Type G Type A00001 00001 000001 Type B 000001 000001 001 Type C 1 1 01 Type D 00010001 0000001 Type E 01 001 00001 Type F 001 01 0001 Type G 00000010000001
 1.


29. The method of claim 24, wherein the plurality of codeword tablescomprises at least one of the following codeword tables Coded MB Mostcommon macroblock type type Type A Type B Type C Type A 01 0001 000001Type B 101 1 0001 Type C 00 001 1 Type D 11 01 01 Type E 10001 00000100001 Type F 1001 00001 001 Coded MB Most Common macroblock type typeType D Type E Type F Type A 01001 000001 000001 Type B 001 00001 00001Type C 000 001 001 Type D 1 01 1 Type E 0101 0001 0001 Type F 011 1
 01.


30. The method of claim 24, wherein the most common macroblock typecomprises a first macroblock type having equal frequency of occurrenceamong the plurality of neighboring macroblocks, with a second macroblocktype, but precedence over that of the second macroblock type.
 31. Themethod of claim 24, wherein at least one of the codeword tables furthercomprises a codeword to encode whether a quantization parameter of themacroblock has changed (DQUANT).
 32. The method of claim 31, wherein atleast one of the DQUANTs is a selected one of “0000000”, “01100”, and“100000”.
 33. The method of claim 31, wherein at least one of theDQUANTs is a selected one of “01000”, and “10000”.